import java.util.Scanner;

public class Main1 {
    public static void find(int n,int x,int []a){
        int left=0,right=0;
        int sum=0;
        int minLength=Integer.MAX_VALUE;
        int minLeft=-1;
        while (right<n){
            sum+=a[right];
            while (sum<=x){
                if (right-left+1<minLength){
                    minLength=right-left+1;
                    minLeft=left;
                }
                sum-=a[left];
                left++;
            }
            right++;
        }
        if(minLeft!=-1){
            System.out.println("["+minLeft+","+(minLeft+minLength-1)+"]");
        }else{
            System.out.println("No valid interval found");
        }
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);

        int n=scanner.nextInt();
        int x=scanner.nextInt();

        int []a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=scanner.nextInt();
        }
    find(n,x,a);
    }
}
